Skip to content

Conversation

@xrmx
Copy link
Contributor

@xrmx xrmx commented Nov 12, 2025

Description

Make it easier for distributions to override the processors set up by the sdk configurator by specifying a list of span processors, a list of log record processors and the span and log record processor designated to call the exporters.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • tox

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@xrmx xrmx requested a review from a team as a code owner November 12, 2025 11:09
@xrmx xrmx requested a review from jeremydvoss November 13, 2025 09:44
@xrmx xrmx changed the title opentelemetry-sdk: make it possible to customize processors configuation opentelemetry-sdk: make it possible to customize processors configuration Nov 26, 2025
xrmx added 6 commits December 11, 2025 11:12
…tion

Make it easier for distributions to override the processors set up by
the sdk configurator by specifying a span processor and a log record
processor.
@xrmx xrmx force-pushed the sdk-config-custom-processors branch from d84b162 to ba28759 Compare December 12, 2025 16:15
@xrmx xrmx requested review from herin049 and rads-1996 January 14, 2026 13:24
Comment on lines +112 to +119
class ExporterSpanProcessor(SpanProcessor):
def __init__(self, span_exporter: SpanExporter, *args, **kwargs): ...


class ExporterLogRecordProcessor(LogRecordProcessor):
def __init__(self, exporter: LogRecordExporter, *args, **kwargs): ...


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure there is a super good way to type this, but maybe we could do something like this?

Suggested change
class ExporterSpanProcessor(SpanProcessor):
def __init__(self, span_exporter: SpanExporter, *args, **kwargs): ...
class ExporterLogRecordProcessor(LogRecordProcessor):
def __init__(self, exporter: LogRecordExporter, *args, **kwargs): ...
P = ParamSpec("P")
_ExporterSpanProcessorCtorT = Callable[Concatenate[SpanExporter, P], SpanProcessor]
_ExporterLogRecordProcessorCtorT = Callable[Concatenate[LogRecordExporter, P], LogRecordProcessor]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants